# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def menu_items
    return Menu.find(:all, :order => "LENGTH(item) desc")
  end
  
  def to_money(n)
    sprintf("%.2f", n)
  end
  
  def quantities
    return ["0","1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
  end
  
  def unavailable_checked
    return "/images/assets/check_box_checked.jpg"
  end
  
  def unavailable_unchecked
    return "/images/assets/check_box_unchecked.jpg"
  end
  
  def lock_image
    return "/images/assets/lock.jpg"
  end
  
  def google_merchant_id
    return "803448855612443"
  end
  
  def google_merchant_key
    return "pdqaSlIrGIdxaoj6g3frcw"
  end
  
  def google_checkout_url
    return "https://checkout.google.com/api/checkout/v2/checkoutForm/Merchant/#{google_merchant_id}"
  end
  
  def google_checkout_button_url
    return "https://checkout.google.com/buttons/checkout.gif?merchant_id=#{google_merchant_id}&w=160&h=43&style=trans&variant=text&loc=en_US"
  end
  
  def sortable_gallery_attributes
    ["created_at", "updated_at", "name"].sort
  end
  
  def filterable_boolean_gallery_attributes
    ["for_proofing", "invisible", "is_approved"].sort
  end
  
end
